package com.itao.config;

import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.loadbalancer.core.DiscoveryClientServiceInstanceListSupplier;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;

/**
 * @Description
 * @Author sjt
 * @CreateTime 2023/03/15 13:53
 */

public class FeignConfig {

    @Bean
    public ServiceInstanceListSupplier discoveryClientServiceInstanceListSupplier(
            DiscoveryClient discoveryClient,
            Environment env
    ) {
        return new DiscoveryClientServiceInstanceListSupplier(discoveryClient, env);
    }
}
